(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))
Rewrite Strategy: FULL
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
min(0', y) → 0'
min(s(x), 0') → 0'
min(s(x), s(y)) → min(x, y)
len(nil) → 0'
len(cons(x, xs)) → s(len(xs))
sum(x, 0') → x
sum(x, s(y)) → s(sum(x, y))
le(0', x) → true
le(s(x), 0') → false
le(s(x), s(y)) → le(x, y)
take(0', cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0', min(len(x), len(y))), 0', x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))
S is empty.
Rewrite Strategy: FULL
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
TRS:
Rules:
min(0', y) → 0'
min(s(x), 0') → 0'
min(s(x), s(y)) → min(x, y)
len(nil) → 0'
len(cons(x, xs)) → s(len(xs))
sum(x, 0') → x
sum(x, s(y)) → s(sum(x, y))
le(0', x) → true
le(s(x), 0') → false
le(s(x), s(y)) → le(x, y)
take(0', cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0', min(len(x), len(y))), 0', x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
min,
len,
sum,
le,
take,
ifThey will be analysed ascendingly in the following order:
min < if
len < if
sum < if
le < if
take < if
(6) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
The following defined symbols remain to be analysed:
min, len, sum, le, take, if
They will be analysed ascendingly in the following order:
min < if
len < if
sum < if
le < if
take < if
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
min(
gen_0':s4_0(
n7_0),
gen_0':s4_0(
n7_0)) →
gen_0':s4_0(
0), rt ∈ Ω(1 + n7
0)
Induction Base:
min(gen_0':s4_0(0), gen_0':s4_0(0)) →RΩ(1)
0'
Induction Step:
min(gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(+(n7_0, 1))) →RΩ(1)
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) →IH
gen_0':s4_0(0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
The following defined symbols remain to be analysed:
len, sum, le, take, if
They will be analysed ascendingly in the following order:
len < if
sum < if
le < if
take < if
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
len(
gen_nil:cons5_0(
n440_0)) →
gen_0':s4_0(
n440_0), rt ∈ Ω(1 + n440
0)
Induction Base:
len(gen_nil:cons5_0(0)) →RΩ(1)
0'
Induction Step:
len(gen_nil:cons5_0(+(n440_0, 1))) →RΩ(1)
s(len(gen_nil:cons5_0(n440_0))) →IH
s(gen_0':s4_0(c441_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
len(gen_nil:cons5_0(n440_0)) → gen_0':s4_0(n440_0), rt ∈ Ω(1 + n4400)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
The following defined symbols remain to be analysed:
sum, le, take, if
They will be analysed ascendingly in the following order:
sum < if
le < if
take < if
(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
sum(
gen_0':s4_0(
a),
gen_0':s4_0(
n676_0)) →
gen_0':s4_0(
+(
n676_0,
a)), rt ∈ Ω(1 + n676
0)
Induction Base:
sum(gen_0':s4_0(a), gen_0':s4_0(0)) →RΩ(1)
gen_0':s4_0(a)
Induction Step:
sum(gen_0':s4_0(a), gen_0':s4_0(+(n676_0, 1))) →RΩ(1)
s(sum(gen_0':s4_0(a), gen_0':s4_0(n676_0))) →IH
s(gen_0':s4_0(+(a, c677_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(14) Complex Obligation (BEST)
(15) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
len(gen_nil:cons5_0(n440_0)) → gen_0':s4_0(n440_0), rt ∈ Ω(1 + n4400)
sum(gen_0':s4_0(a), gen_0':s4_0(n676_0)) → gen_0':s4_0(+(n676_0, a)), rt ∈ Ω(1 + n6760)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
The following defined symbols remain to be analysed:
le, take, if
They will be analysed ascendingly in the following order:
le < if
take < if
(16) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
le(
gen_0':s4_0(
n1411_0),
gen_0':s4_0(
n1411_0)) →
true, rt ∈ Ω(1 + n1411
0)
Induction Base:
le(gen_0':s4_0(0), gen_0':s4_0(0)) →RΩ(1)
true
Induction Step:
le(gen_0':s4_0(+(n1411_0, 1)), gen_0':s4_0(+(n1411_0, 1))) →RΩ(1)
le(gen_0':s4_0(n1411_0), gen_0':s4_0(n1411_0)) →IH
true
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(17) Complex Obligation (BEST)
(18) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
len(gen_nil:cons5_0(n440_0)) → gen_0':s4_0(n440_0), rt ∈ Ω(1 + n4400)
sum(gen_0':s4_0(a), gen_0':s4_0(n676_0)) → gen_0':s4_0(+(n676_0, a)), rt ∈ Ω(1 + n6760)
le(gen_0':s4_0(n1411_0), gen_0':s4_0(n1411_0)) → true, rt ∈ Ω(1 + n14110)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
The following defined symbols remain to be analysed:
take, if
They will be analysed ascendingly in the following order:
take < if
(19) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
take(
gen_0':s4_0(
n1734_0),
gen_nil:cons5_0(
+(
1,
n1734_0))) →
gen_0':s4_0(
0), rt ∈ Ω(1 + n1734
0)
Induction Base:
take(gen_0':s4_0(0), gen_nil:cons5_0(+(1, 0))) →RΩ(1)
0'
Induction Step:
take(gen_0':s4_0(+(n1734_0, 1)), gen_nil:cons5_0(+(1, +(n1734_0, 1)))) →RΩ(1)
take(gen_0':s4_0(n1734_0), gen_nil:cons5_0(+(1, n1734_0))) →IH
gen_0':s4_0(0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(20) Complex Obligation (BEST)
(21) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
len(gen_nil:cons5_0(n440_0)) → gen_0':s4_0(n440_0), rt ∈ Ω(1 + n4400)
sum(gen_0':s4_0(a), gen_0':s4_0(n676_0)) → gen_0':s4_0(+(n676_0, a)), rt ∈ Ω(1 + n6760)
le(gen_0':s4_0(n1411_0), gen_0':s4_0(n1411_0)) → true, rt ∈ Ω(1 + n14110)
take(gen_0':s4_0(n1734_0), gen_nil:cons5_0(+(1, n1734_0))) → gen_0':s4_0(0), rt ∈ Ω(1 + n17340)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
The following defined symbols remain to be analysed:
if
(22) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol if.
(23) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
len(gen_nil:cons5_0(n440_0)) → gen_0':s4_0(n440_0), rt ∈ Ω(1 + n4400)
sum(gen_0':s4_0(a), gen_0':s4_0(n676_0)) → gen_0':s4_0(+(n676_0, a)), rt ∈ Ω(1 + n6760)
le(gen_0':s4_0(n1411_0), gen_0':s4_0(n1411_0)) → true, rt ∈ Ω(1 + n14110)
take(gen_0':s4_0(n1734_0), gen_nil:cons5_0(+(1, n1734_0))) → gen_0':s4_0(0), rt ∈ Ω(1 + n17340)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
No more defined symbols left to analyse.
(24) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
(25) BOUNDS(n^1, INF)
(26) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
len(gen_nil:cons5_0(n440_0)) → gen_0':s4_0(n440_0), rt ∈ Ω(1 + n4400)
sum(gen_0':s4_0(a), gen_0':s4_0(n676_0)) → gen_0':s4_0(+(n676_0, a)), rt ∈ Ω(1 + n6760)
le(gen_0':s4_0(n1411_0), gen_0':s4_0(n1411_0)) → true, rt ∈ Ω(1 + n14110)
take(gen_0':s4_0(n1734_0), gen_nil:cons5_0(+(1, n1734_0))) → gen_0':s4_0(0), rt ∈ Ω(1 + n17340)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
No more defined symbols left to analyse.
(27) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
(28) BOUNDS(n^1, INF)
(29) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
len(gen_nil:cons5_0(n440_0)) → gen_0':s4_0(n440_0), rt ∈ Ω(1 + n4400)
sum(gen_0':s4_0(a), gen_0':s4_0(n676_0)) → gen_0':s4_0(+(n676_0, a)), rt ∈ Ω(1 + n6760)
le(gen_0':s4_0(n1411_0), gen_0':s4_0(n1411_0)) → true, rt ∈ Ω(1 + n14110)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
No more defined symbols left to analyse.
(30) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
(31) BOUNDS(n^1, INF)
(32) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
len(gen_nil:cons5_0(n440_0)) → gen_0':s4_0(n440_0), rt ∈ Ω(1 + n4400)
sum(gen_0':s4_0(a), gen_0':s4_0(n676_0)) → gen_0':s4_0(+(n676_0, a)), rt ∈ Ω(1 + n6760)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
No more defined symbols left to analyse.
(33) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
(34) BOUNDS(n^1, INF)
(35) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
len(gen_nil:cons5_0(n440_0)) → gen_0':s4_0(n440_0), rt ∈ Ω(1 + n4400)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
No more defined symbols left to analyse.
(36) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
(37) BOUNDS(n^1, INF)
(38) Obligation:
TRS:
Rules:
min(
0',
y) →
0'min(
s(
x),
0') →
0'min(
s(
x),
s(
y)) →
min(
x,
y)
len(
nil) →
0'len(
cons(
x,
xs)) →
s(
len(
xs))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
le(
0',
x) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
take(
0',
cons(
y,
ys)) →
ytake(
s(
x),
cons(
y,
ys)) →
take(
x,
ys)
addList(
x,
y) →
if(
le(
0',
min(
len(
x),
len(
y))),
0',
x,
y,
nil)
if(
false,
c,
x,
y,
z) →
zif(
true,
c,
xs,
ys,
z) →
if(
le(
s(
c),
min(
len(
xs),
len(
ys))),
s(
c),
xs,
ys,
cons(
sum(
take(
c,
xs),
take(
c,
ys)),
z))
Types:
min :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
len :: nil:cons → 0':s
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
sum :: 0':s → 0':s → 0':s
le :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
take :: 0':s → nil:cons → 0':s
addList :: nil:cons → nil:cons → nil:cons
if :: true:false → 0':s → nil:cons → nil:cons → nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons
Lemmas:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))
No more defined symbols left to analyse.
(39) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
min(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n70)
(40) BOUNDS(n^1, INF)